{template 'common/header-base'}
	<div class="navbar navbar-inverse navbar-static-top" role="navigation">
		<div class="container container-fill">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
			</div>
			<div class="navbar-collapse collapse">
				<ul class="nav navbar-nav">
                    <li><a href="./?refresh"><i class="fa fa-home fa-stack-1x"></i></a></li>
					<li{if FRAME == 'plan'} class="active"{/if}><a href="{url 'plan/plan/list'}">账户监测通知</a></li>
					<li{if FRAME == 'grant'} class="active"{/if}><a href="{url 'grant/grant/list'}">拨款凭证信息</a></li>
					<li{if FRAME == 'finance'} class="active"{/if}><a href="{url 'finance/finance/list'}">财政库款划拨信息</a></li>
				</ul>
				<ul class="nav navbar-nav navbar-right">
					<li class="dropdown">
						<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">{$_W['user']['username']} {if $_W['role'] == 'founder'}(系统管理员){/if}<b class="caret"></b></a>
						<ul class="dropdown-menu">
                            <li><a href="{url 'user/profile/profile'}" target="_blank"><i class="fa fa-user fa-fw"></i> 我的账号</a></li>
							<li class="divider"></li>
							<li><a href="{url 'user/logout'}"><i class="fa fa-sign-out"></i> 退出系统</a></li>
						</ul>
					</li>
				</ul>
			</div>
		</div>
	</div>

	<div class="container-fluid" style="margin-left: 10px;margin-right: 10px">
		{if defined('IN_MESSAGE')}
		<div class="jumbotron clearfix alert alert-{$label}">
			<div class="row">
				<div class="col-xs-12 col-sm-4 col-md-3 col-lg-2">
					<i class="fa fa-5x fa-{if $label=='success'}check-circle{/if}{if $label=='danger'}times-circle{/if}{if $label=='info'}info-circle{/if}{if $label=='warning'}exclamation-triangle{/if}"></i>
				</div>
				<div class="col-xs-12 col-sm-8 col-md-9 col-lg-10">
					{if is_array($msg)}
						<h2>MYSQL 错误：</h2>
						<p>{php echo cutstr($msg['sql'], 300, 1);}</p>
						<p><b>{$msg['error'][0]} {$msg['error'][1]}：</b>{$msg['error'][2]}</p>
					{else}
					<h2>{$caption}</h2>
					<p>{$msg}</p>
					{/if}
					{if $redirect}
					<p><a href="{$redirect}">如果你的浏览器没有自动跳转，请点击此链接</a></p>
					<script type="text/javascript">
						setTimeout(function () {
							location.href = "{$redirect}";
						}, 3000);
					</script>
					{else}
					<p>[<a href="javascript:history.go(-1);">点击这里返回上一页</a>] &nbsp; [<a href="./?refresh">首页</a>]</p>
					{/if}
				</div>
		{else}
		<div class="row">
			{php $frames = empty($frames) ? $GLOBALS['frames'] : $frames;}
			{if !empty($frames)}
				<div class="col-xs-12 col-sm-3 col-md-2 col-lg-2">
					{loop $frames $k $frame}
					<div class="panel panel-default">
						<div class="panel-heading">
							<h4 class="panel-title"><a data-toggle="collapse" href="#frame-{$k}">{$frame['title']}</a></h4>
						</div>
						<ul class="list-group in" id="frame-{$k}">
							{loop $frame['items'] $link}
							{if !empty($link['append'])}
							<li class="list-group-item{$link['active']}">
								<a href="{$link['url']}">{$link['title']}</a>
								<a class="pull-right" href="{$link['append']['url']}">{$link['append']['title']}</a>
							</li>
							{else}
							<a class="list-group-item{$link['active']}" href="{$link['url']}">{$link['title']}</a>
							{/if}
							{/loop}
						</ul>
					</div>
					{/loop}
				</div>
				<div class="col-xs-12 col-sm-8 col-md-9 col-lg-10">
			{else}
				<div>
			{/if}
		{/if}